public class Main {
    public int getMost(int[][] board) {

        int col = board.length;
        int row= board[0].length;

        for(int i = 1; i < col; i++) {
            board[i][0] += board[i-1][0];
        }

        for(int j = 1; j < row; j++) {
            board[0][j] +=board[0][j-1];
        }

        for(int i = 1; i < col; i++) {
            for(int j = 1; j < row; j++) {
                board[i][j] += Math.max(board[i-1][j],board[i][j-1]);
            }
        }

        return board[col-1][row-1];
    }

    public static void main(String[] args) {

    }
}
